<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .box {
            width: 100px;
            height: 100px; 
            float: left;
            background-color: red;
            margin-right: 10px;
        }
        .box2 {
            width: 100px;
            height: 100px;
            background-color: orange;
        }
        .box3 {
            /* display: inline-block; */
            /* position: absolute;虽然包裹住了但是定位也会浮动到上面那层去了 */
            display:inline;
        }
        /* .box3::after {
            content: '';
            display: block;
            clear: both;
        } */
    </style>
</head>
<body>
    <div class="box3">
        <div class="box"></div>
        <div class="box"></div>
    </div>

    
    <!-- <span>123123</span> -->
    <div class="box2">11</div>
    <!-- 
        因为box浮动，使box3没有了高度，不能包裹box，
        所以下面的box2会插到下面去，所以必须清除浮动
     -->
</body>
</html>